package com.woniuxy.cloud.carl.carlgoods.client;

import com.woniuxy.cloud.carl.carlgoods.client.dto.SkuDto;
import com.woniuxy.cloud.carl.carlgoods.client.param.FindSkuByContionParam;
import com.woniuxy.cloud.carl.carlgoods.client.util.MyPage;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "SkuQueryClient",name="carlgoods")
public interface SkuQueryClient {
@PostMapping("/findSkuBycondition")
    public Result<MyPage<SkuDto>>  findSkuBycondition(@RequestBody FindSkuByContionParam param);
@GetMapping("/findSkuById")
public Result<SkuDto> findSkuById(@RequestParam("skuId") Long skuId);

    @GetMapping("/findSkuBySpuId")
    public Result<List<SkuDto>> findSkuBySpuId(@RequestParam("spuId")Long spuId);
}
